package com.lyy.king.tools.interfaces.impl;

import com.lyy.king.common.core.domain.Result;
import com.lyy.king.tools.interfaces.CaptchaInterface;
import com.lyy.king.tools.model.response.CaptchaResponse;
import com.lyy.king.tools.request.CheckCaptchaRequest;
import com.lyy.king.tools.service.captcha.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: cdx
 * @Created: 2024/1/7 14:33
 */
@Service
public class CaptchaInterfaceImpl implements CaptchaInterface {
    @Autowired
    CaptchaService captchaService;

    @Override
    public Result<CaptchaResponse> captchaImage() {
        return Result.succcess(captchaService.captchaImage());
    }

    @Override
    public Result<Boolean> checkCaptcha(CheckCaptchaRequest request) {
        return Result.succcess(captchaService.checkCaptcha(request));
    }
}
